#include "RtpPacket.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

bool RtpPacket::isRTPPacket(char * stream, int length)
{
	return ((stream[0]>>6) & 0x02);
}


RtpPacket::RtpPacket(char * stream, int length)
{
	this->buffer = stream;
	this->length = length;

}


bool RtpPacket::getPayload(char * &buffer, int & length)
{
return true;
}


unsigned short int RtpPacket::getSequenceNbr()
{
return ((this->buffer[2] & 0xff) << 8 | this->buffer[3]);
}
unsigned int RtpPacket::getTimestamp()
{
return ((this->buffer[4]  & 0xff) <<24 | (this->buffer[5]  & 0xff) <<16 | (this->buffer[6]  & 0xff) <<8 | (this->buffer[7] & 0xff));
}
